package com.example.pceb.result;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum ResultCode {
    OK(200, "成功"),
    FAIL(400, "错误"),
    NOT_FOUND(404, "找不到资源"),
    ERROR(500, "服务器错误");

    private final int code;
    private final String description;

    // 添加获取描述的方法，方便在Result中使用
    public String getDescription() {
        return description;
    }
}